package com.comac.print.component.app.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 服务调用记录表
 * </p>
 *
 * @author zhoubin
 * @since 2025-04-16 03:51:14
 */
@Getter
@Setter
@TableName("print_record")
@ApiModel(value = "PrintRecord对象", description = "服务调用记录表")
public class PrintMRecord extends Model<PrintMRecord> {

    @ApiModelProperty("id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("服务戳")
    @TableField("system_id")
    private String systemId;

    @ApiModelProperty("场景名")
    @TableField("bussiness_id")
    private String bussinessId;

    @ApiModelProperty("模板ID")
    @TableField("mp_id")
    private String mpId;

    @ApiModelProperty("模板url")
    @TableField("mp_url")
    private String mpUrl;

    @ApiModelProperty("操作时间")
    @TableField("operator_time")
    private Date operatorTime;

    @ApiModelProperty("是否成功")
    @TableField("is_success")
    private Boolean isSuccess;

    @ApiModelProperty("报错信息")
    @TableField("err_message")
    private String errMessage;

    @ApiModelProperty("打印数据内容")
    @TableField("print_data")
    private String printData;

    @ApiModelProperty("打印合并的文件下载url")
    @TableField("print_file_url")
    private String printFileUrl;

    @ApiModelProperty("是否删除")
    @TableField("delete_flag")
    @TableLogic
    private Boolean deleteFlag = false;

    @Override
    public Serializable pkVal() {
        return this.id;
    }
}
